const connection = require('./connect');

async function insertWord(word, pronunciation, explain) {
  const statement = `INSERT INTO word (word, pronunciation, explanation) VALUES (?, ?, ?);`;
  const [result] = await connection.execute(statement, [word, pronunciation, explain]);
  return result;
}

module.exports = insertWord;

